package Presentation.action;
import Presentation.action.LoginSwingWorker;

import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.plaf.FontUIResource;

import Main.Constants;
import Presentationlayout.AdminLogin;

/**
 * A action class that responds to the logonBtn in
 * {@link AdminLogin} and creates a SwingWorker that
 * executes in {@link LoginSwingWorker}.
 * 
 * @author Emma Hägglund
 *
 */

public class AdminLoginAction implements ActionListener {

	private AdminLogin login;

	public AdminLoginAction(AdminLogin login) {
		this.login = login;
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		LoginSwingWorker worker = new LoginSwingWorker(login);
		worker.execute();
		}
}